package com.dzh.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName fund
 */
@TableName(value ="fund")
@Data
public class Fund implements Serializable {
    /**
     * 基金id
     */
    @TableId(type = IdType.AUTO)
    private Integer fid;

    /**
     * 基金名称
     */
    private String fname;

    /**
     * 基金利率
     */
    private Long interestrate;

    /**
     * 最小投资金额
     */
    private Long investmentmin;

    /**
     * 最大投资金额
     */
    private Long investmentmax;

    /**
     * 基金最大时间
     */
    private Date maxtime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Fund other = (Fund) that;
        return (this.getFid() == null ? other.getFid() == null : this.getFid().equals(other.getFid()))
            && (this.getFname() == null ? other.getFname() == null : this.getFname().equals(other.getFname()))
            && (this.getInterestrate() == null ? other.getInterestrate() == null : this.getInterestrate().equals(other.getInterestrate()))
            && (this.getInvestmentmin() == null ? other.getInvestmentmin() == null : this.getInvestmentmin().equals(other.getInvestmentmin()))
            && (this.getInvestmentmax() == null ? other.getInvestmentmax() == null : this.getInvestmentmax().equals(other.getInvestmentmax()))
            && (this.getMaxtime() == null ? other.getMaxtime() == null : this.getMaxtime().equals(other.getMaxtime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFid() == null) ? 0 : getFid().hashCode());
        result = prime * result + ((getFname() == null) ? 0 : getFname().hashCode());
        result = prime * result + ((getInterestrate() == null) ? 0 : getInterestrate().hashCode());
        result = prime * result + ((getInvestmentmin() == null) ? 0 : getInvestmentmin().hashCode());
        result = prime * result + ((getInvestmentmax() == null) ? 0 : getInvestmentmax().hashCode());
        result = prime * result + ((getMaxtime() == null) ? 0 : getMaxtime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", fid=").append(fid);
        sb.append(", fname=").append(fname);
        sb.append(", interestrate=").append(interestrate);
        sb.append(", investmentmin=").append(investmentmin);
        sb.append(", investmentmax=").append(investmentmax);
        sb.append(", maxtime=").append(maxtime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}